package code.rocky.chapter07;

public class Me implements Staff, Passenger {
    @Override
    public boolean isStanding() {
        return true;
    }

    @Override
    public int getSalary() {
        return 2000;
    }

    public static <T extends Staff & Passenger> void discount(T t) {
        if (t.getSalary() < 2500 && t.isStanding()) {
            System.out.println("恭喜你! ");
        }
    }

    public static void main(String[] args) {
        discount(new Me());
    }
}
